<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="string" uri="http://jakarta.apache.org/taglibs/string-1.1" %>
<%@ taglib uri="/WEB-INF/tlds/pagination.tld" prefix="pagination" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Bettersoft Portal</title>
    <link href="/common/css/indexStyle.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="/common/js/common.js"></script>
    <script type="text/javascript">
        // Locale 설정을 바꾼다.
        function jsChangeLocale(lan) {
            var TheForm = document.menuFrm;
            TheForm.nextTarget.value = "intro";
            TheForm.action = "${pageContext.request.contextPath}/changeLocale.do?language=" + lan;
            TheForm.submit();
        }
    </script>
</head>
<body>

<form name="frm" method="POST" onkeypress="if(event.keyCode == 13) {return false;}" >
    <input type="hidden" id="nextTarget"    name="nextTarget"   value="">
    <input type="hidden" id="pageId" name="pageId" value="login" />

    <!-- 세션 검사 및 로그인 / 비로그인 팝업 -->
    <%
        HttpSession s = request.getSession(false); // HttpSession 이 존재하면 세션을 반환 없으면 null 값 반환

        if(null == s.getAttribute("userId")){
    %>

    <%--상단 div--%>
    <div style="width: 100%; height: 10%">
        <div align="left" style="float: left;">
            <b style="font-size:20pt">BetterSoft</b>
        </div>
        <div align="right" style="float: right;">
            <p style="font-size: 15pt"> 환영합니다. OOO님 (세션없음)&nbsp;&nbsp;&nbsp;</p>
        </div>
    </div>

    <%
    }else{
    %>

    <!-- level 1 이상 : 보통 가맹점 회원 -->
    <!-- HttpSession 이 존재할 경우 : userId, userName-->
    <%--상단 div--%>
    <div style="width: 100%; height: 10%">
        <div align="left" style="float: left;">
            <b style="font-size:20pt">BetterSoft</b>
        </div>
        <div align="right" style="float: right;">
            <p style="font-size: 15pt"> 환영합니다. <%=s.getAttribute("userId")%> 님 &nbsp;&nbsp;&nbsp;</p>
        </div>
    </div>

    <% } %>
    <br/><hr/>
    <div>
        <div  style="width: 20%; height: 80%; float: left;" >

            <a href="myInfo.do">
                <div align="center" style="height: 10%; border:#000000; border-style: groove; border-left-width: 3px; border-right-width: 3px; border-top-width: 3px; border-bottom-width: 1px">
                    MyInfo
                </div>
            </a>
            <a href="#">
                <div align="center" style="height: 10%;  border:#000000; border-style: inset; border-left-width: 3px; border-right-width: 3px; border-top-width: 1px; border-bottom-width: 1px">
                    Message
                </div>
            </a>
            <a href="#">
                <div align="center" style="height: 10%;  border:#000000; border-style: outset; border-left-width: 3px; border-right-width: 3px; border-top-width: 1px; border-bottom-width: 1px">
                    Notice
                </div>
            </a>
            <a href="#">
                <div align="center" style="height: 10%;  border:#000000; border-style: outset; border-left-width: 3px; border-right-width: 3px; border-top-width: 1px; border-bottom-width: 1px">
                    Board
                </div>
            </a>
            <a href="#">
                <div align="center" style="height: 10%;  border:#000000; border-style: outset; border-left-width: 3px; border-right-width: 3px; border-top-width: 1px; border-bottom-width: 1px">
                    Music
                </div>
            </a>
            <a href="#">
                <div align="center" style="height: 10%;  border:#000000; border-style: ridge; border-left-width: 3px; border-right-width: 3px; border-top-width: 1px; border-bottom-width: 3px">
                    Movie
                </div>
            </a>
        </div>
        <div style="width: 80%; height: 80%; float: right;">
            본문 내용
        </div>
    </div>


    <br/><hr/>
    <div>
        Bettersoft inc, Alright reserved. 2012
    </div>



</form>
</body>
</html>